Skip to content

Fix three verification failure causes in push, check_suite, and TrustSignal client#12

Merged
chrismaz11 merged 2 commits intomainfrom
copilot/fix-trustsignal-github-app
Mar 16, 2026
Merged

Fix three verification failure causes in push, check_suite, and TrustSignal client#12
chrismaz11 merged 2 commits intomainfrom
copilot/fix-trustsignal-github-app

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

Three independent bugs were causing spurious "TrustSignal Verification failed" check runs in GitHub.

Zero-SHA branch deletion events (normalizePushPayload)

GitHub sends push events with after = "000...0" when a branch is deleted. This was being forwarded as headSha to TrustSignal, producing a verification request for a non-existent commit and a guaranteed failure check run.

// before: deletion events passed through and failed at the API
return { headSha: payload.after, ... };

// after: deletion events are ignored cleanly
if (!payload.after || payload.after === ZERO_SHA) return null;

check_suite detailsUrl pointed to the REST API (normalizeCheckSuitePayload)

detailsUrl was set to checkSuite.url (the API endpoint), so clicking "Details" on a check run opened raw JSON. Now uses checkSuite.html_url when present, falling back to the commit URL.

Missing accept header in TrustSignal client

The client wasn't sending Accept: application/json. CDNs and reverse proxies commonly serve HTML error pages when Accept is absent, triggering the non-JSON fallback path unnecessarily or causing hard failures on the secondary endpoint.

headers: {
  "content-type": "application/json",
  "accept": "application/json",        // added
  authorization: `******
},

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

…check_suite detailsUrl

Co-authored-by: chrismaz11 <24700273+chrismaz11@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix TrustSignal GitHub app functionality Fix three verification failure causes in push, check_suite, and TrustSignal client Mar 16, 2026
Copilot AI requested a review from chrismaz11 March 16, 2026 14:35
@chrismaz11 chrismaz11 marked this pull request as ready for review March 16, 2026 18:31
@chrismaz11 chrismaz11 merged commit 396a288 into main Mar 16, 2026
5 of 6 checks passed
@chrismaz11 chrismaz11 deleted the copilot/fix-trustsignal-github-app branch March 16, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants